<?php

/**
 * Created by PhpStorm.
 * User: 申霖
 * Date: 2019/8/27 0027
 * Time: 下午 8:05
 */
class MY_Controller extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $name     = $this->session->userdata('userName');
        $base_url = $this->config->item('base_url');
        if (!$name) {
            $this->load->helper('url');
            redirect($base_url . '/login.html');
        }
    }
}